import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-03-12
 * Time: 15:07
 */
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String input =  in.nextLine();
        String[] ret = input.split(" ");
        int len = ret[ret.length-1].length();
        System.out.println(len);
    }
}